package com.mars.module.admin.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 患者挂号预约对象 sys_reservation
 *
 * @author mars
 * @date 2024-04-12
 */

@Data
@ApiModel(value = "患者挂号预约对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_reservation")
public class SysReservation {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 医生
     */
    @Excel(name = "医生")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "医生")
    private Long doctor;

    @TableField(exist = false)
    @ApiModelProperty(value = "医生姓名")
    private String doctorName;

    /**
     * 预约时间
     */
    @Excel(name = "预约时间")
    @ApiModelProperty(value = "预约时间")
    private LocalDate time;
    /**
     * 患者
     */
    @Excel(name = "患者")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "患者")
    private Long userId;

    @TableField(exist = false)
    @ApiModelProperty(value = "患者姓名")
    private String userName;

    /**
     * 状态
     */
    @Excel(name = "状态")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "状态")
    private Long status;

    @TableField(exist = false)
    @ApiModelProperty(value = "状态名称")
    private String statusName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;
}
